// abstract 抽象类  不能new 实例化 
abstract class Animal{
    name:string;
    age:number;
    constructor(name:string,age:number){
        this.name=name
        this.age=age
    }
    say(){
        console.log(`我是${this.name},${this.age}岁`)
    }
    // abstract tell():void
}

class Dog extends Animal{
    sayWhat:string;
    constructor(sayWhat:string,name:string,age:number){
        super(name,age);
        this.sayWhat=sayWhat
    }
    tell(){
        console.log('继承的父类中有抽象的此方法')
        console.log(`我说了${this.sayWhat}`)
    }
}

let Dog1=new Dog('哈哈哈','小白',5)
Dog1.say()
Dog1.tell()
